package menuTest
{
	import flash.display.Bitmap;
	import flash.display.Sprite;
	import iscript.uiFramework.components.button.BaseButton; 
	import iscript.uiFramework.components.menu.MenuStrip;
	import iscript.uiFramework.components.menu.ToolStripLabel;
	import iscript.uiFramework.components.menu.ToolStripMenuPanel;
	
	public class menutest extends Sprite
	{
		[Embed(source="../../bin/icon/wall.png")]
		private var wall:Class;
		
		[Embed(source="../../bin/icon/sitemap.png")]
		private var sitemap:Class
		
		//[Embed (source = "../../bin/icon/slide.png")]
		[Embed(source="../../bin/rss.png")]
		private var silde:Class
		
		public function menutest()
		{
			var tsmp:ToolStripMenuPanel = new ToolStripMenuPanel();
				//tsmp.x = 47;
				//tsmp.y = 23;
				tsmp.addText("运行",null,Bitmap(new wall()).bitmapData);
		 
			   var toolstripLabe:ToolStripLabel = tsmp.addText("编译", null, Bitmap(new sitemap()).bitmapData);
			       toolstripLabe.ClickHandler = function(e:ToolStripLabel):void {
													trace(ToolStripLabel(e).text)
												}
				tsmp.addText("AS2");
				tsmp.addText ("AS3");
				tsmp.addText("Batch",null,Bitmap(new silde()).bitmapData);
				tsmp.addSeparator ()
				tsmp.addText("CSharp");
				tsmp.addText("CSS");
				tsmp.addText("Html");
				tsmp.addText("JavaScript");
				tsmp.addText("XML");
				tsmp.addText("Python");
			
			
			var menu:MenuStrip = new MenuStrip(600,50);
			menu.addMenuItem("文件");
			menu.addMenuItem("编辑",tsmp);
			menu.addMenuItem("调试");
			menu.addMenuItem("帮助");
			menu.addMenuItem("File");
			menu.addMenuItem("Edit");
			menu.addMenuItem("Debug");
			menu.addMenuItem("Help");
			menu.height = 40
			//menu.border = true;
			
			/*menu.x = 100;
			menu.y = 70;*/
			menu.render(this);
			
			var button:BaseButton = new BaseButton();
			button.text = "File";
			button.y = 100;
			button.toggle = true;
			button.render(this);
			
 
			
		}
	
	}

}